package star.cloud.asme.base.fowable.listener.excutionListener;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.flowable.engine.impl.delegate.ActivityBehavior;
import org.flowable.engine.runtime.ProcessInstance;
import org.flowable.variable.api.persistence.entity.VariableInstance;
import org.springframework.mail.MailSender;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.stereotype.Component;
import star.cloud.asme.system.user.UserService;

import java.util.Map;

@Component("sendMailToInitiatorExecutionListener")
@RequiredArgsConstructor
@Slf4j
public class SendMailToInitiatorExecutionListener implements ExecutionListener {

    private final MailSender mailSender;
    private final RuntimeService runtimeService;
    private final UserService userService;

    @Override
    public void notify(DelegateExecution execution) {
        log.info("sendMailToInitiatorExecutionListener is running");

        log.info("sendMailToInitiatorExecutionListener is finished");
    }
}
